package kr.hkit.powerjava.s;

class Rectangle {

	int w;
	int h;

	public void setW(int w) {
		this.w = w;
	}

	public void setH(int h) {
		this.h = h;
	}

	int area() {
		System.out.println(w * h);
		return w * h;
	}

	int perimeter() {
		System.out.println((w + h) * 2);
		return (w + h) * 2;
	}

}

public class RectangleTest {
	public static void main(String[] args) {
		Rectangle re = new Rectangle();

		re.setH(10);
		re.setW(20);
		re.area();
		re.perimeter();

	}

}
